import {
  axios
} from '@/utils/request'
// 供应商分页列表
function getSupplierPageList (params) {
  return axios({
    url: '/vehicle-service/supplier/list',
    method: 'get',
    params
  })
}

// 新增供应商
function addSupplier (data) {
  return axios({
    url: '/vehicle-service/supplier',
    method: 'post',
    data
  })
}

// 编辑供应商
function editSupplier (data) {
  return axios({
    url: '/vehicle-service/supplier',
    method: 'put',
    data
  })
}

// 删除供应商
function deleteSupplier (data) {
  return axios({
    url: '/vehicle-service/supplier',
    method: 'delete',
    data
  })
}

// 供应商详情
function getSupplierInfo (params) {
  return axios({
    url: '/vehicle-service/supplier/info',
    method: 'get',
    params
  })
}

// 供应商下拉列表
function getSupplierSelect (params) {
  return axios({
    url: '/vehicle-service/supplier/select',
    method: 'get',
    params
  })
}

export default {
  getSupplierPageList,
  addSupplier,
  editSupplier,
  deleteSupplier,
  getSupplierInfo,
  getSupplierSelect
}
